﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;

namespace Yglu.BusinessLayer.Entities
{
	public abstract class BaseEntityCollection : List<BaseEntity>
	{
		#region Main methods

		public abstract void Load(SqlDataReader reader);

		public String GetIds()
		{
			String ids = String.Empty;

			for (Int32 i = 0; i < Count; i++)
			{
				ids += this[i].Id + ",";
			}

			return ids.Substring(0, ids.Length - 1);
		}

		#endregion
	}
}